/* 右上角弹框样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.tech-toast {
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 212, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(1.2);
    -webkit-backdrop-filter: blur(25px) saturate(1.2);
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
}

.tech-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.tech-toast::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.tech-toast.success {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 136, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tech-toast.success::before {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
}

.tech-toast.warning {
    border-color: rgba(255, 170, 0, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 170, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tech-toast.warning::before {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
}

.tech-toast.danger {
    border-color: rgba(255, 71, 87, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 71, 87, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tech-toast.danger::before {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
}

.tech-toast.info::before {
    background: var(--gradient-primary);
}

.toast-header {
    background: rgba(0, 212, 255, 0.08);
    border-bottom: 1px solid rgba(42, 52, 65, 0.4);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

.toast-icon.success {
    background: var(--success-color);
    color: var(--dark-bg);
}

.toast-icon.warning {
    background: var(--warning-color);
    color: var(--dark-bg);
}

.toast-icon.danger {
    background: var(--danger-color);
    color: white;
}

.toast-icon.info {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.toast-body {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.1s linear;
}

.toast-progress.success {
    background: var(--success-color);
}

.toast-progress.warning {
    background: var(--warning-color);
}

.toast-progress.danger {
    background: var(--danger-color);
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.tech-toast.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .tech-toast {
        min-width: auto;
    }
}